Skip to content

README: add reserved job-field names and UndeclaredVariable's scope to Not planned - #109

Merged
HalRiveria merged 2 commits into
mainfrom
docs/readme-not-planned-additions
Dec 2, 2026
Merged

HalRiveria merged 2 commits into
mainfrom
docs/readme-not-planned-additions

Conversation

@HalRiveria-Bot

Copy link
Copy Markdown
Collaborator

Two decisions that weren't in the README's "Not planned" list yet, so someone hitting either could read it as an oversight:

  • Fewer reserved names on job hashtables. Moving seven of the dispatcher's thirteen reserved job-field names under one key would cut the list to seven, but each is read for every job, and the nested lookup costs time per job on Windows PowerShell 5.1.
  • Telling a worker's own functions apart in the UndeclaredVariable check. A variable counts as declared if the worker declares or assigns it anywhere, so a function's parameter can hide an empty read of the same name outside the function. Telling scopes apart would mean following dot-sourced functions and functions that read their caller's variables, and a wrong guess refuses a worker that works.

Docs only, no code changes. The example in the second entry was run through Test-PkWorkerSafety on Windows PowerShell 5.1 and PowerShell 7.6: param($Id) function Add-One { param($n) $n + 1 }; $n + $Id gives no UndeclaredVariable finding, while param($Id) $n + $Id gives one. The #process-dispatch-with-groups link points at the section that lists the reserved names.

@HalRiveria
HalRiveria merged commit 19c7abb into main Dec 2, 2026
3 checks passed
@HalRiveria
HalRiveria deleted the docs/readme-not-planned-additions branch December 2, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants